package manual100;

import zclTool.*;

import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.util.*;


public class B_Rphid_IB_Att_Value {
	public static void main(String[] args) throws Exception{
		DelimitedReader dr =new DelimitedReader(args[0]);
		OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(
				args[1]), "utf-8");
		String line[];
		int ln = 0;
		while((line = dr.read())!=null && ln++ < 1000){
			String rphid = line[0];
			String article = line[1];
			String ib = line[2];
			if(!ib.contains("Infobox"))continue;
			ib = ib.replace("Infobox", "").trim().toLowerCase();
			String att = line[3].toLowerCase();
			String value = line[4];
			osw.write(rphid+"\t"+article+"\t"+ib+"@"+att+"\t"+value+"\n");
		}
		dr.close();
		osw.close();
	}
}
